<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Sequences</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-data-types.html" title="GLib Data Types">
<link rel="prev" href="glib-Double-ended-Queues.html" title="Double-ended Queues">
<link rel="next" href="glib-Trash-Stacks.html" title="Trash Stacks">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Double-ended-Queues.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-data-types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Trash-Stacks.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3329417" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3330603" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="glib-Sequences"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3329417"></a><span class="refentrytitle">Sequences</span>
</h2>
<p>Sequences &#8212; scalable lists</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib.h&gt;


                    <a class="link" href="glib-Sequences.html#GSequence">GSequence</a>;
typedef             <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>;
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                (<a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">*GSequenceIterCompareFunc</a>)         (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);

<a class="link" href="glib-Sequences.html#GSequence">GSequence</a>*          <a class="link" href="glib-Sequences.html#g-sequence-new">g_sequence_new</a>                      (<a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> data_destroy);
void                <a class="link" href="glib-Sequences.html#g-sequence-free">g_sequence_free</a>                     (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-Sequences.html#g-sequence-get-length">g_sequence_get_length</a>               (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);
void                <a class="link" href="glib-Sequences.html#g-sequence-foreach">g_sequence_foreach</a>                  (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-foreach-range">g_sequence_foreach_range</a>            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-sort">g_sequence_sort</a>                     (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-sort-iter">g_sequence_sort_iter</a>                (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);

<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-get-begin-iter">g_sequence_get_begin_iter</a>           (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-get-end-iter">g_sequence_get_end_iter</a>             (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-get-iter-at-pos">g_sequence_get_iter_at_pos</a>          (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> pos);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-append">g_sequence_append</a>                   (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-prepend">g_sequence_prepend</a>                  (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-insert-before">g_sequence_insert_before</a>            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);
void                <a class="link" href="glib-Sequences.html#g-sequence-move">g_sequence_move</a>                     (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *src,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *dest);
void                <a class="link" href="glib-Sequences.html#g-sequence-swap">g_sequence_swap</a>                     (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted">g_sequence_insert_sorted</a>            (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted-iter">g_sequence_insert_sorted_iter</a>       (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-sort-changed">g_sequence_sort_changed</a>             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-sort-changed-iter">g_sequence_sort_changed_iter</a>        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
void                <a class="link" href="glib-Sequences.html#g-sequence-remove">g_sequence_remove</a>                   (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
void                <a class="link" href="glib-Sequences.html#g-sequence-remove-range">g_sequence_remove_range</a>             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);
void                <a class="link" href="glib-Sequences.html#g-sequence-move-range">g_sequence_move_range</a>               (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *dest,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-search">g_sequence_search</a>                   (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-search-iter">g_sequence_search_iter</a>              (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);

<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Sequences.html#g-sequence-get">g_sequence_get</a>                      (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
void                <a class="link" href="glib-Sequences.html#g-sequence-set">g_sequence_set</a>                      (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);

<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Sequences.html#g-sequence-iter-is-begin">g_sequence_iter_is_begin</a>            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Sequences.html#g-sequence-iter-is-end">g_sequence_iter_is_end</a>              (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-iter-next">g_sequence_iter_next</a>                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-iter-prev">g_sequence_iter_prev</a>                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-Sequences.html#g-sequence-iter-get-position">g_sequence_iter_get_position</a>        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-iter-move">g_sequence_iter_move</a>                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> delta);
<a class="link" href="glib-Sequences.html#GSequence">GSequence</a>*          <a class="link" href="glib-Sequences.html#g-sequence-iter-get-sequence">g_sequence_iter_get_sequence</a>        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);

<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-Sequences.html#g-sequence-iter-compare">g_sequence_iter_compare</a>             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b);
<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      <a class="link" href="glib-Sequences.html#g-sequence-range-get-midpoint">g_sequence_range_get_midpoint</a>       (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3330603"></a><h2>Description</h2>
<p>
The <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> data structure has the API of a list, but is
implemented internally with a balanced binary tree. This means that it
is possible to maintain a sorted list of n elements in time O(n log
n). The data contained in each element can be either integer values, by
using of the 
<a class="link" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros">Type Conversion Macros</a>,
or simply pointers to any type of data.
</p>
<p>
A <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> is accessed through <em class="firstterm">iterators</em>,
represented by a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>. An iterator represents a position
between two elements of the sequence. For example, the
<em class="firstterm">begin</em> iterator represents the gap immediately
before the first element of the sequence, and the
<em class="firstterm">end</em> iterator represents the gap immediately
after the last element. In an empty sequence, the begin and end
iterators are the same.
</p>
<p>
Some methods on <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> operate on ranges of items. For example
<a class="link" href="glib-Sequences.html#g-sequence-foreach-range"><code class="function">g_sequence_foreach_range()</code></a> will call a user-specified function on each
element with the given range. The range is delimited by the gaps
represented by the passed-in iterators, so if you pass in the begin
and end iterators, the range in question is the entire sequence.
</p>
<p>
The function <a class="link" href="glib-Sequences.html#g-sequence-get"><code class="function">g_sequence_get()</code></a> is used with an iterator to access the
element immediately following the gap that the iterator
represents. The iterator is said to <em class="firstterm">point</em> to
that element.
</p>
<p>
Iterators are stable across most operations on a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>. For
example an iterator pointing to some element of a sequence will
continue to point to that element even after the sequence is
sorted. Even moving an element to another sequence using for example
<a class="link" href="glib-Sequences.html#g-sequence-move-range"><code class="function">g_sequence_move_range()</code></a> will not invalidate the iterators pointing to
it. The only operation that will invalidate an iterator is when the
element it points to is removed from any sequence.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3330750"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3330761"></a><h3>
<a name="GSequence"></a>GSequence</h3>
<a class="indexterm" name="id3330773"></a><pre class="programlisting">typedef struct _GSequence GSequence;</pre>
<p>
The <span class="structname">GSequence</span> struct is an opaque data type
representing a <a class="link" href="glib-Sequences.html" title="Sequences">Sequence</a> data type.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3330801"></a><h3>
<a name="GSequenceIter"></a>GSequenceIter</h3>
<a class="indexterm" name="id3330814"></a><pre class="programlisting">typedef struct _GSequenceNode  GSequenceIter;
</pre>
<p>
The <span class="structname">GSequenceIter</span> struct is an opaque data
type representing an iterator pointing into a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3330842"></a><h3>
<a name="GSequenceIterCompareFunc"></a>GSequenceIterCompareFunc ()</h3>
<a class="indexterm" name="id3330855"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                (*GSequenceIterCompareFunc)         (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
A <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc"><span class="type">GSequenceIterCompareFunc</span></a> is a function used to compare
iterators. It must return zero if the iterators compare equal, a
negative value if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, and a positive value if <em class="parameter"><code>b</code></em> comes
before <em class="parameter"><code>a</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td>user data
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>zero if the iterators are equal, a negative value if <em class="parameter"><code>a</code></em>
comes before <em class="parameter"><code>b</code></em>, and a positive value if <em class="parameter"><code>b</code></em> comes before <em class="parameter"><code>a</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331029"></a><h3>
<a name="g-sequence-new"></a>g_sequence_new ()</h3>
<a class="indexterm" name="id3331044"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequence">GSequence</a>*          g_sequence_new                      (<a class="link" href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> data_destroy);</pre>
<p>
Creates a new GSequence. The <em class="parameter"><code>data_destroy</code></em> function, if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will
be called on all items when the sequence is destroyed and on items that
are removed from the sequence.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data_destroy</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> function, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331157"></a><h3>
<a name="g-sequence-free"></a>g_sequence_free ()</h3>
<a class="indexterm" name="id3331172"></a><pre class="programlisting">void                g_sequence_free                     (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);</pre>
<p>
Frees the memory allocated for <em class="parameter"><code>seq</code></em>. If <em class="parameter"><code>seq</code></em> has a data destroy 
function associated with it, that function is called on all items in
<em class="parameter"><code>seq</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331255"></a><h3>
<a name="g-sequence-get-length"></a>g_sequence_get_length ()</h3>
<a class="indexterm" name="id3331270"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_sequence_get_length               (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);</pre>
<p>
Returns the length of <em class="parameter"><code>seq</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the length of <em class="parameter"><code>seq</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331355"></a><h3>
<a name="g-sequence-foreach"></a>g_sequence_foreach ()</h3>
<a class="indexterm" name="id3331371"></a><pre class="programlisting">void                g_sequence_foreach                  (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> for each item in the sequence passing <em class="parameter"><code>user_data</code></em>
to the function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td> the function to call for each item in <em class="parameter"><code>seq</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331502"></a><h3>
<a name="g-sequence-foreach-range"></a>g_sequence_foreach_range ()</h3>
<a class="indexterm" name="id3331518"></a><pre class="programlisting">void                g_sequence_foreach_range            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc">GFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> for each item in the range (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) passing
<em class="parameter"><code>user_data</code></em> to the function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331694"></a><h3>
<a name="g-sequence-sort"></a>g_sequence_sort ()</h3>
<a class="indexterm" name="id3331709"></a><pre class="programlisting">void                g_sequence_sort                     (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Sorts <em class="parameter"><code>seq</code></em> using <em class="parameter"><code>cmp_func</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to sort <em class="parameter"><code>seq</code></em>. This function is
      passed two items of <em class="parameter"><code>seq</code></em> and should return 0 if they are equal,
      a negative value fi the first comes before the second, and a
      positive value if the second comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3331858"></a><h3>
<a name="g-sequence-sort-iter"></a>g_sequence_sort_iter ()</h3>
<a class="indexterm" name="id3331873"></a><pre class="programlisting">void                g_sequence_sort_iter                (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-sort"><code class="function">g_sequence_sort()</code></a>, but uses a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc"><span class="type">GSequenceIterCompareFunc</span></a> instead
of a GCompareDataFunc as the compare function</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em>&#160;:</span></p></td>
<td> the <span class="type">GSequenceItercompare</span> used to compare iterators in the
    sequence. It is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
    return 0 if the iterators are equal, a negative value if the first
    iterator comes before the second, and a positive value if the second
    iterator comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332029"></a><h3>
<a name="g-sequence-get-begin-iter"></a>g_sequence_get_begin_iter ()</h3>
<a class="indexterm" name="id3332044"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_get_begin_iter           (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);</pre>
<p>
Returns the begin iterator for <em class="parameter"><code>seq</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the begin iterator for <em class="parameter"><code>seq</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332130"></a><h3>
<a name="g-sequence-get-end-iter"></a>g_sequence_get_end_iter ()</h3>
<a class="indexterm" name="id3332145"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_get_end_iter             (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq);</pre>
<p>
Returns the end iterator for <em class="parameter"><code>seg</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> 
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the end iterator for <em class="parameter"><code>seq</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332231"></a><h3>
<a name="g-sequence-get-iter-at-pos"></a>g_sequence_get_iter_at_pos ()</h3>
<a class="indexterm" name="id3332247"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_get_iter_at_pos          (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> pos);</pre>
<p>
Returns the iterator at position <em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is negative or larger
than the number of items in <em class="parameter"><code>seq</code></em>, the end iterator is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></p></td>
<td> a position in <em class="parameter"><code>seq</code></em>, or -1 for the end.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> at position <em class="parameter"><code>pos</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332382"></a><h3>
<a name="g-sequence-append"></a>g_sequence_append ()</h3>
<a class="indexterm" name="id3332397"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_append                   (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Adds a new item to the end of <em class="parameter"><code>seq</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <span class="type">GSequencePointer</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> an iterator pointing to the new item

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332501"></a><h3>
<a name="g-sequence-prepend"></a>g_sequence_prepend ()</h3>
<a class="indexterm" name="id3332517"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_prepend                  (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Adds a new item to the front of <em class="parameter"><code>seq</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> an iterator pointing to the new item

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332618"></a><h3>
<a name="g-sequence-insert-before"></a>g_sequence_insert_before ()</h3>
<a class="indexterm" name="id3332633"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_insert_before            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Inserts a new item just before the item pointed to by <em class="parameter"><code>iter</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> an iterator pointing to the new item

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332738"></a><h3>
<a name="g-sequence-move"></a>g_sequence_move ()</h3>
<a class="indexterm" name="id3332753"></a><pre class="programlisting">void                g_sequence_move                     (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *src,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *dest);</pre>
<p>
Moves the item pointed to by <em class="parameter"><code>src</code></em> to the position indicated by <em class="parameter"><code>dest</code></em>.
After calling this function <em class="parameter"><code>dest</code></em> will point to the position immediately
after <em class="parameter"><code>src</code></em>. It is allowed for <em class="parameter"><code>src</code></em> and <em class="parameter"><code>dest</code></em> to point into different
sequences.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the item to move
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position to which
       the item is moved.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3332887"></a><h3>
<a name="g-sequence-swap"></a>g_sequence_swap ()</h3>
<a class="indexterm" name="id3332903"></a><pre class="programlisting">void                g_sequence_swap                     (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b);</pre>
<p>
Swaps the items pointed to by <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>. It is allowed for <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>
to point into difference sequences.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333021"></a><h3>
<a name="g-sequence-insert-sorted"></a>g_sequence_insert_sorted ()</h3>
<a class="indexterm" name="id3333036"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_insert_sorted            (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>sequence</code></em> using <em class="parameter"><code>func</code></em> to determine the new position.
The sequence must already be sorted according to <em class="parameter"><code>cmp_func</code></em>; otherwise the
new position of <em class="parameter"><code>data</code></em> is undefined.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> the data to insert
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to compare items in the sequence. It
    is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>. It should
    return 0 if the items are equal, a negative value if the first
    item comes before the second, and a positive value if the second
    item comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the new item.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333247"></a><h3>
<a name="g-sequence-insert-sorted-iter"></a>g_sequence_insert_sorted_iter ()</h3>
<a class="indexterm" name="id3333263"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_insert_sorted_iter       (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-insert-sorted"><code class="function">g_sequence_insert_sorted()</code></a>, but uses
a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc"><span class="type">GSequenceIterCompareFunc</span></a> instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> as
the compare function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em>&#160;:</span></p></td>
<td> the <span class="type">GSequenceItercompare</span> used to compare iterators in the
    sequence. It is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
    return 0 if the iterators are equal, a negative value if the first
    iterator comes before the second, and a positive value if the second
    iterator comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the new item

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333466"></a><h3>
<a name="g-sequence-sort-changed"></a>g_sequence_sort_changed ()</h3>
<a class="indexterm" name="id3333482"></a><pre class="programlisting">void                g_sequence_sort_changed             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Moves the data pointed to a new position as indicated by <em class="parameter"><code>cmp_func</code></em>. This
function should be called for items in a sequence already sorted according
to <em class="parameter"><code>cmp_func</code></em> whenever some aspect of an item changes so that <em class="parameter"><code>cmp_func</code></em>
may return different values for that item.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> A <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to compare items in the sequence. It
    is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>. It should
    return 0 if the items are equal, a negative value if the first
    item comes before the second, and a positive value if the second
    item comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333642"></a><h3>
<a name="g-sequence-sort-changed-iter"></a>g_sequence_sort_changed_iter ()</h3>
<a class="indexterm" name="id3333658"></a><pre class="programlisting">void                g_sequence_sort_changed_iter        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-sort-changed"><code class="function">g_sequence_sort_changed()</code></a>, but uses
a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc"><span class="type">GSequenceIterCompareFunc</span></a> instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> as
the compare function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em>&#160;:</span></p></td>
<td> the <span class="type">GSequenceItercompare</span> used to compare iterators in the
    sequence. It is called with two iterators pointing into <em class="parameter"><code>seq</code></em>. It should
    return 0 if the iterators are equal, a negative value if the first
    iterator comes before the second, and a positive value if the second
    iterator comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333822"></a><h3>
<a name="g-sequence-remove"></a>g_sequence_remove ()</h3>
<a class="indexterm" name="id3333837"></a><pre class="programlisting">void                g_sequence_remove                   (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Removes the item pointed to by <em class="parameter"><code>iter</code></em>. It is an error to pass the
end iterator to this function.
</p>
<p>
If the sequnce has a data destroy function associated with it, this
function is called on the data for the removed item.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3333915"></a><h3>
<a name="g-sequence-remove-range"></a>g_sequence_remove_range ()</h3>
<a class="indexterm" name="id3333930"></a><pre class="programlisting">void                g_sequence_remove_range             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);</pre>
<p>
Removes all items in the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range.
</p>
<p>
If the sequence has a data destroy function associated with it, this
function is called on the data for the removed items.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334042"></a><h3>
<a name="g-sequence-move-range"></a>g_sequence_move_range ()</h3>
<a class="indexterm" name="id3334057"></a><pre class="programlisting">void                g_sequence_move_range               (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *dest,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);</pre>
<p>
Inserts the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range at the destination pointed to by ptr.
The <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> iters must point into the same sequence. It is
allowed for <em class="parameter"><code>dest</code></em> to point to a different sequence than the one pointed
into by <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em>.
</p>
<p>
If <em class="parameter"><code>dest</code></em> is NULL, the range indicated by <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> is
removed from the sequence. If <em class="parameter"><code>dest</code></em> iter points to a place within
the (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range, the range does not move.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334265"></a><h3>
<a name="g-sequence-search"></a>g_sequence_search ()</h3>
<a class="indexterm" name="id3334280"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_search                   (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> cmp_func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Returns an iterator pointing to the position where <em class="parameter"><code>data</code></em> would
be inserted according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_func</code></em>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to compare items in the sequence. It
    is called with two items of the <em class="parameter"><code>seq</code></em> and <em class="parameter"><code>user_data</code></em>. It should
    return 0 if the items are equal, a negative value if the first
    item comes before the second, and a positive value if the second
    item comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>cmp_func</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> an <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position where <em class="parameter"><code>data</code></em>
would have been inserted according to <em class="parameter"><code>cmp_func</code></em> and <em class="parameter"><code>cmp_data</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334497"></a><h3>
<a name="g-sequence-search-iter"></a>g_sequence_search_iter ()</h3>
<a class="indexterm" name="id3334512"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_search_iter              (<a class="link" href="glib-Sequences.html#GSequence">GSequence</a> *seq,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc">GSequenceIterCompareFunc</a> iter_cmp,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> cmp_data);</pre>
<p>
Like <a class="link" href="glib-Sequences.html#g-sequence-search"><code class="function">g_sequence_search()</code></a>, but uses
a <a class="link" href="glib-Sequences.html#GSequenceIterCompareFunc"><span class="type">GSequenceIterCompareFunc</span></a> instead of a <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> as
the compare function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> data for the new item
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter_cmp</code></em>&#160;:</span></p></td>
<td> the <span class="type">GSequenceIterCompare</span> function used to compare iterators
    in the sequence. It is called with two iterators pointing into <em class="parameter"><code>seq</code></em>.
    It should return 0 if the iterators are equal, a negative value if the
    first iterator comes before the second, and a positive value if the
    second iterator comes before the first.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmp_data</code></em>&#160;:</span></p></td>
<td> user data passed to <em class="parameter"><code>iter_cmp</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the position in <em class="parameter"><code>seq</code></em>
where <em class="parameter"><code>data</code></em> would have been inserted according to <em class="parameter"><code>iter_cmp</code></em> and <em class="parameter"><code>cmp_data</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334740"></a><h3>
<a name="g-sequence-get"></a>g_sequence_get ()</h3>
<a class="indexterm" name="id3334755"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_sequence_get                      (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns the data that <em class="parameter"><code>iter</code></em> points to.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the data that <em class="parameter"><code>iter</code></em> points to

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334843"></a><h3>
<a name="g-sequence-set"></a>g_sequence_set ()</h3>
<a class="indexterm" name="id3334858"></a><pre class="programlisting">void                g_sequence_set                      (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data);</pre>
<p>
Changes the data for the item pointed to by <em class="parameter"><code>iter</code></em> to be <em class="parameter"><code>data</code></em>. If
the sequence has a data destroy function associated with it, that
function is called on the existing data that <em class="parameter"><code>iter</code></em> pointed to.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td> new data for the item
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3334965"></a><h3>
<a name="g-sequence-iter-is-begin"></a>g_sequence_iter_is_begin ()</h3>
<a class="indexterm" name="id3334980"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_sequence_iter_is_begin            (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns whether <em class="parameter"><code>iter</code></em> is the begin iterator</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> whether <em class="parameter"><code>iter</code></em> is the begin iterator

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335069"></a><h3>
<a name="g-sequence-iter-is-end"></a>g_sequence_iter_is_end ()</h3>
<a class="indexterm" name="id3335084"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_sequence_iter_is_end              (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns whether <em class="parameter"><code>iter</code></em> is the end iterator</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> Whether <em class="parameter"><code>iter</code></em> is the end iterator.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335172"></a><h3>
<a name="g-sequence-iter-next"></a>g_sequence_iter_next ()</h3>
<a class="indexterm" name="id3335188"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_iter_next                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns an iterator pointing to the next position after <em class="parameter"><code>iter</code></em>. If
<em class="parameter"><code>iter</code></em> is the end iterator, the end iterator is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the next position after <em class="parameter"><code>iter</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335292"></a><h3>
<a name="g-sequence-iter-prev"></a>g_sequence_iter_prev ()</h3>
<a class="indexterm" name="id3335307"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_iter_prev                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns an iterator pointing to the previous position before <em class="parameter"><code>iter</code></em>. If
<em class="parameter"><code>iter</code></em> is the begin iterator, the begin iterator is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing to the previous position before
<em class="parameter"><code>iter</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335411"></a><h3>
<a name="g-sequence-iter-get-position"></a>g_sequence_iter_get_position ()</h3>
<a class="indexterm" name="id3335427"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_sequence_iter_get_position        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns the position of <em class="parameter"><code>iter</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the position of <em class="parameter"><code>iter</code></em>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335514"></a><h3>
<a name="g-sequence-iter-move"></a>g_sequence_iter_move ()</h3>
<a class="indexterm" name="id3335530"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_iter_move                (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> delta);</pre>
<p>
Returns the <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> which is <em class="parameter"><code>delta</code></em> positions away from <em class="parameter"><code>iter</code></em>.
If <em class="parameter"><code>iter</code></em> is closer than -<em class="parameter"><code>delta</code></em> positions to the beginning of the sequence,
the begin iterator is returned. If <em class="parameter"><code>iter</code></em> is closer than <em class="parameter"><code>delta</code></em> positions
to the end of the sequence, the end iterator is returned.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delta</code></em>&#160;:</span></p></td>
<td> A positive or negative number indicating how many positions away
   from <em class="parameter"><code>iter</code></em> the returned <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> will be.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> which is <em class="parameter"><code>delta</code></em> positions away from <em class="parameter"><code>iter</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335710"></a><h3>
<a name="g-sequence-iter-get-sequence"></a>g_sequence_iter_get_sequence ()</h3>
<a class="indexterm" name="id3335726"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequence">GSequence</a>*          g_sequence_iter_get_sequence        (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *iter);</pre>
<p>
Returns the <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> that <em class="parameter"><code>iter</code></em> points into.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Sequences.html#GSequence"><span class="type">GSequence</span></a> that <em class="parameter"><code>iter</code></em> points into.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3335830"></a><h3>
<a name="g-sequence-iter-compare"></a>g_sequence_iter_compare ()</h3>
<a class="indexterm" name="id3335845"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_sequence_iter_compare             (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *a,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *b);</pre>
<p>
Returns a negative number if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, 0 if they are equal,
and a positive number if <em class="parameter"><code>a</code></em> comes after <em class="parameter"><code>b</code></em>.
</p>
<p>
The <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> iterators must point into the same sequence.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> A negative number if <em class="parameter"><code>a</code></em> comes before <em class="parameter"><code>b</code></em>, 0 if they are
equal, and a positive number if <em class="parameter"><code>a</code></em> comes after <em class="parameter"><code>b</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3336014"></a><h3>
<a name="g-sequence-range-get-midpoint"></a>g_sequence_range_get_midpoint ()</h3>
<a class="indexterm" name="id3336029"></a><pre class="programlisting"><a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a>*      g_sequence_range_get_midpoint       (<a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *begin,
                                                         <a class="link" href="glib-Sequences.html#GSequenceIter">GSequenceIter</a> *end);</pre>
<p>
Finds an iterator somewhere in the range (<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>). This
iterator will be close to the middle of the range, but is not
guaranteed to be <span class="emphasis"><em>exactly</em></span> in the middle.
</p>
<p>
The <em class="parameter"><code>begin</code></em> and <em class="parameter"><code>end</code></em> iterators must both point to the same sequence and
<em class="parameter"><code>begin</code></em> must come before or be equal to <em class="parameter"><code>end</code></em> in the sequence.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>begin</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> A <a class="link" href="glib-Sequences.html#GSequenceIter"><span class="type">GSequenceIter</span></a> pointing somewhere in the
(<em class="parameter"><code>begin</code></em>, <em class="parameter"><code>end</code></em>) range.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.14
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3336202"></a><div class="refsect2" lang="en"><a name="id3336203"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id3336204"></a></div>
</div>
</div>
</body>
</html>
